﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" 
Inherits="System.Web.Mvc.ViewPage<Library.Web.ViewModels.RequestBookViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Request a book
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Request a book</h2>
    <hr />

    <% using (Html.BeginForm()) { %>
        
        <%= Html.ValidationSummary(false) %>

        <table> 
            <tr>
                <th></th>
                <th></th>
                <th></th>
            </tr>
            <tr valign="top">
                <td><%: Html.LabelFor(m => m.Request.BookTitle) %></td>
                <td>
                    <%: Html.TextBoxFor(m => m.Request.BookTitle) %>
                    <%: Html.ValidationMessageFor(m => m.Request.BookTitle, "*") %>
                </td>
            </tr>
            <tr valign="top">
                <td> <%: Html.LabelFor(m => m.Request.BookAuthors) %></td>
                <td>
                    <%: Html.TextBoxFor(m => m.Request.BookAuthors) %>
                    <%: Html.ValidationMessageFor(m => m.Request.BookAuthors, "*") %>
                </td>
            </tr>
            <tr valign="top">
                <td><%: Html.LabelFor(m => m.Request.Reason) %></td>
                <td>
                    <%: Html.TextAreaFor(m => m.Request.Reason, 7, 30, null) %>
                    <%: Html.ValidationMessageFor(m => m.Request.Reason, "*") %>
                </td>
                
            </tr>

            <tr valign="top">
                <td><%: Html.LabelFor(m => m.Request.UrlToBook) %></td>
                <td>
                    <%: Html.TextAreaFor(m => m.Request.UrlToBook, 7, 30, null) %>
                    <%: Html.ValidationMessageFor(m => m.Request.UrlToBook, "*") %>
                </td>
                
            </tr>
        </table>

        <br />
        <input class="button-link" type="submit" value="Submit" />

    <%} %>

</asp:Content>
